package com.example.tests;


public class ContactData implements Comparable<ContactData> {
	private String name;
	private String lastname;
	private String mycity;
	private String homePhone;
	private String mobilePhone;
	private String workPhone;
	private String email;
	private String email2;
	private String birthDay;
	private String birthMonth;
	private String birthYear;
	private String address2;
	private String homePhone2;
	private String value;

	public ContactData() {
	}
	
	public ContactData(String name1, String lastname1,
			String mycity1, String homephone1, String mobilephone1,
			String workphone1, String email, String email2, String birthDay, String birthMonth, String birthYear,
			String address2, String homephone2) {
		this.name = name1;
		this.lastname = lastname1;
		this.mycity = mycity1;
		this.homePhone = homephone1;
		this.mobilePhone = mobilephone1;
		this.workPhone = workphone1;
		this.email = email;
		this.email2 = email2;
		this.birthDay = birthDay;
		this.birthMonth = birthMonth;
		this.birthYear = birthYear;
		this.address2 = address2;
		this.homePhone2 = homephone2;
	}

	

	@Override
	public String toString() {
		return "ContactData [name = " + name + "]";
	}





	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
			result = prime * result
			+ ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ContactData other = (ContactData) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}

	@Override
    public int compareTo(ContactData other) {
            
            return this.name.toLowerCase().compareTo(other.name.toLowerCase());
    }
	
	
	public ContactData setName(String name) {
		this.name = name;
		return this;
	}

	public ContactData setLastName(String lastname) {
		this.lastname = lastname;
		return this;
	}
	
	public ContactData setValue(String value) {
		this.value = value;
		return this;
	}

	public void setMycity(String mycity) {
		this.mycity = mycity;
	}

	public void setHomePhone(String homePhone) {
		this.homePhone = homePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	public void setWorkPhone(String workPhone) {
		this.workPhone = workPhone;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setEmail2(String email2) {
		this.email2 = email2;
	}

	public void setBirthDay(String birthDay) {
		this.birthDay = birthDay;
	}

	public void setBirthMonth(String birthMonth) {
		this.birthMonth = birthMonth;
	}

	public void setBirthYear(String birthYear) {
		this.birthYear = birthYear;
	}

	public void setAddress(String address2) {
		this.address2 = address2;
	}

	public void setHomePhone2(String homePhone2) {
		this.homePhone2 = homePhone2;
	}

	public ContactData withName(String name) {
		this.name = name;
	return this;
	}

	public ContactData withLastname(String lastname) {
		this.lastname = lastname;
	return this;
	}

	public ContactData withMycity(String mycity) {
		this.mycity = mycity;
	return this;
	}

	public ContactData withHomephone(String homePhone) {
		this.homePhone=homePhone;
	return this;
	}

	public ContactData withMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	return this;
	}

	public ContactData withWorkphone(String workPhone) {
		this.workPhone = workPhone;
	return this;
	}

	public ContactData withEmail(String email) {
		this.email = email;
	return this;
	}

	public ContactData withEmail2(String email2) {
		this.email2 = email2;
	return this;
	}

	public ContactData withAddress(String address2) {
		this.address2 = address2;
	return this;
	}

	public ContactData withHomePhone2(String homePhone2) {
		this.homePhone2 = homePhone2;
	return this;
	}

	public String getName() {
		return name;
	}

	public String getLastname() {
		return lastname;
	}

	public String getMycity() {
		return mycity;
	}

	public String getHomePhone() {
		return homePhone;
	}

	public String getMobilePhone() {
		return mobilePhone;
	}

	public String getWorkPhone() {
		return workPhone;
	}

	public String getEmail() {
		return email;
	}

	public String getEmail2() {
		return email2;
	}

	public String getBirthDay() {
		return birthDay;
	}

	public String getBirthMonth() {
		return birthMonth;
	}

	public String getBirthYear() {
		return birthYear;
	}

	public String getAddress() {
		return address2;
	}

	public String getHomePhone2() {
		return homePhone2;
	}

	public String getValue() {
		return value;
	}


	
	
	
}